<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>jld.api.gliffy</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="jld-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="jld-module.html">Package&nbsp;jld</a> ::
        <a href="jld.api-module.html">Package&nbsp;api</a> ::
        Module&nbsp;gliffy
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="jld.api.gliffy-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module gliffy</h1><p class="nomargin-top"><span class="codelink"><a href="jld.api.gliffy-pysrc.html">source&nbsp;code</a></span></p>
<p>Gliffy API</p>

<hr />
<div class="fields">      <p><strong>Author:</strong>
        Jean-Lou Dupont
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>c = Client()
<span class="py-prompt">&gt;&gt;&gt; </span>result, etag = c.head(1472486)
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> result, etag <span class="py-comment"># doctest:+ELLIPSIS</span>
<span class="py-output">True...</span></pre>
      </p>
      <p><strong>Version:</strong>
        $Id: jld.api.gliffy-module.html 776 2009-01-07 03:14:20Z JeanLou.Dupont $
      </p>
</div><!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="jld.api.gliffy.Client-class.html" class="summary-name">Client</a><br />
      Client API to Gliffy
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="jld.api.gliffy-module.html#extractIdFromListOfURI" class="summary-sig-name">extractIdFromListOfURI</a>(<span class="summary-sig-arg">list</span>)</span><br />
      Extracts the diagram ids' from a list of URI
    @param list: a list of URI
    @return: a list of diagram ids</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="jld.api.gliffy-pysrc.html#extractIdFromListOfURI">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="jld.api.gliffy-module.html#extractIdFromURI" class="summary-sig-name">extractIdFromURI</a>(<span class="summary-sig-arg">uri</span>)</span><br />
      Extracts the diagram ID from a URI</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="jld.api.gliffy-pysrc.html#extractIdFromURI">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="jld.api.gliffy-module.html#representations" class="summary-sig-name">representations</a>(<span class="summary-sig-arg">id</span>)</span><br />
      Generator for representations
        @param id: the source diagram id 
        @return: URI to target representation</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="jld.api.gliffy-pysrc.html#representations">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__author__"></a><span class="summary-name">__author__</span> = <code title="'Jean-Lou Dupont'"><code class="variable-quote">'</code><code class="variable-string">Jean-Lou Dupont</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_api"></a><span class="summary-name">_api</span> = <code title="'www.gliffy.com'"><code class="variable-quote">'</code><code class="variable-string">www.gliffy.com</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="jld.api.gliffy-module.html#_patterns" class="summary-name" onclick="show_private();">_patterns</a> = <code title="[re.compile(r'/publish/(\d+)/'),
 re.compile(r'/pubdoc/(\d+)/'),
 re.compile(r'/publish/(\d+)$'),
 re.compile(r'/pubdoc/(\d+)$')]"><code class="variable-group">[</code>re.compile(r'/publish/<code class="re-group">(</code>\d<code class="re-op">+</code><code class="re-group">)</code>/')<code class="variable-op">, </code>re.compile(r'/pub<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="jld.api.gliffy-module.html#_rawpatterns" class="summary-name" onclick="show_private();">_rawpatterns</a> = <code title="['/publish/(\\d+)/',
 '/pubdoc/(\\d+)/',
 '/publish/(\\d+)$',
 '/pubdoc/(\\d+)$']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">/publish/(\\d+)/</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">/pubdoc/(\\d+)/</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">/publi</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="jld.api.gliffy-module.html#_representations" class="summary-name" onclick="show_private();">_representations</a> = <code title="{'large': '/pubdoc/%s/L.jpg',
 'medium': '/pubdoc/%s/M.jpg',
 'small': '/pubdoc/%s/S.jpg',
 'thumb': '/pubdoc/%s/T.jpg'}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">large</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">/pubdoc/%s/L.jpg</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">/p</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="p"></a><span class="summary-name">p</span> = <code title="'/pubdoc/(\\d+)$'"><code class="variable-quote">'</code><code class="variable-string">/pubdoc/(\\d+)$</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="extractIdFromListOfURI"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">extractIdFromListOfURI</span>(<span class="sig-arg">list</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="jld.api.gliffy-pysrc.html#extractIdFromListOfURI">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Extracts the diagram ids' from a list of URI
    @param list: a list of URI
    @return: a list of diagram ids
    
&gt;&gt;&gt; list = ['http://www.gliffy.com/pubdoc/123/L.jpg','http://www.gliffy.com/pubdoc/456/L.jpg']
&gt;&gt;&gt; result = extractIdFromListOfURI(list)
&gt;&gt;&gt; print result
['123', '456']
&gt;&gt;&gt; list = None
&gt;&gt;&gt; result = extractIdFromListOfURI(list)
&gt;&gt;&gt; print result
[]

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="extractIdFromURI"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">extractIdFromURI</span>(<span class="sig-arg">uri</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="jld.api.gliffy-pysrc.html#extractIdFromURI">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Extracts the diagram ID from a URI</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>uri</code></strong> - the uri</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>the diagram id
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>tests = [         <span class="py-string">'http://www.gliffy.com/publish/1553333/'</span>,         <span class="py-string">'http://www.gliffy.com/pubdoc/1554222/L.jpg'</span>,]
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">for</span> t <span class="py-keyword">in</span> tests:         <span class="py-keyword">print</span> extractIdFromURI( t )
<span class="py-output">1553333</span>
<span class="py-output">1554222</span></pre></dd>
  </dl>
</td></tr></table>
</div>
<a name="representations"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">representations</span>(<span class="sig-arg">id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="jld.api.gliffy-pysrc.html#representations">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Generator for representations
        @param id: the source diagram id 
        @return: URI to target representation
        
&gt;&gt;&gt; for r in representations(123): print r
/pubdoc/123/L.jpg
/pubdoc/123/S.jpg
/pubdoc/123/M.jpg
/pubdoc/123/T.jpg

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="_patterns"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_patterns</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code>re.compile(r'/publish/<code class="re-group">(</code>\d<code class="re-op">+</code><code class="re-group">)</code>/')<code class="variable-op">,</code>
 re.compile(r'/pubdoc/<code class="re-group">(</code>\d<code class="re-op">+</code><code class="re-group">)</code>/')<code class="variable-op">,</code>
 re.compile(r'/publish/<code class="re-group">(</code>\d<code class="re-op">+</code><code class="re-group">)</code>$')<code class="variable-op">,</code>
 re.compile(r'/pubdoc/<code class="re-group">(</code>\d<code class="re-op">+</code><code class="re-group">)</code>$')<code class="variable-group">]</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_rawpatterns"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_rawpatterns</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">/publish/(\\d+)/</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">/pubdoc/(\\d+)/</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">/publish/(\\d+)$</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">/pubdoc/(\\d+)$</code><code class="variable-quote">'</code><code class="variable-group">]</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_representations"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_representations</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">large</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">/pubdoc/%s/L.jpg</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">medium</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">/pubdoc/%s/M.jpg</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">small</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">/pubdoc/%s/S.jpg</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">thumb</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">/pubdoc/%s/T.jpg</code><code class="variable-quote">'</code><code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="jld-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Jan 06 22:12:06 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
